﻿#ifndef SPRITEEFFECT_H
#define SPRITEEFFECT_H
#include "SpritePerDefine.h"
namespace Sprite
{
	class SpriteEffect
	{
	public:
		SpriteEffect(void);
		 virtual void  initEffect(std::wstring filename);
		virtual ~SpriteEffect(void);
		ID3D10Effect* getFX() const { return m_FX; }
		void setFX(ID3D10Effect* val) { m_FX = val; }
		ID3D10EffectTechnique* getTech() const { return m_Tech; }
		void setTechByName(std::string name) { m_Tech = m_FX->GetTechniqueByName(name.c_str()); }
		void setTechByIndex(unsigned int uIndex = 0){ m_Tech = m_FX->GetTechniqueByIndex(uIndex);}
	private:
		ID3D10Effect* m_FX;		
		ID3D10EffectTechnique* m_Tech;
		std::wstring m_strFxName;
	};
}
#endif